<?php
    if(isset($_GET['errortext']))
    {
        ?>
        <script type="text/javascript">
            xalert("<?php echo $_GET['errortext'];?>");
        </script>
        <?php
    }
?>